package com.whu.waterworks.action;

import java.util.ArrayList;
import java.util.List;

import com.opensymphony.xwork2.ActionSupport;
import com.whu.waterworks.model.Alert;
import com.whu.waterworks.service.AlertService;

/**
 * 
 * @author cai
 *	@date  2016-3-14
 *获取所有预警的信息
 */
public class GetAlertData extends ActionSupport{

	private static final long serialVersionUID = 241083427205175144L;
	private AlertService alertService;
	private List<Alert> alerts =new ArrayList();
	@Override
	public String execute() throws Exception {
		alerts =alertService.getAll();
		System.out.println("alert:"+alerts);
		return SUCCESS;
	}
	public AlertService getAlertService() {
		return alertService;
	}
	public void setAlertService(AlertService alertService) {
		this.alertService = alertService;
	}
	public static long getSerialversionuid() {
		return serialVersionUID;
	}
	public List<Alert> getAlerts() {
		return alerts;
	}
	public void setAlerts(List<Alert> alerts) {
		this.alerts = alerts;
	}
}
